#!/usr/bin/env bash
# SPDX-License-Identifier: BSD-3-Clause
# Copyright 2018-2020, Intel Corporation

#
# src/test/pmem_deep_persist/TEST1 -- unit test for pmem_deep_persist
#

. ../unittest/unittest.sh

require_test_type medium
require_fs_type pmem non-pmem

setup

export PMEMOBJ_LOG_LEVEL=15

truncate -s 2M $DIR/testfile1

expect_normal_exit ./pmem_deep_persist$EXESUFFIX $DIR/testfile1 p 0 0

count_lines "<libpmemobj>: <15>.*pmem\.c.*pmem_msync.*" pmemobj$UNITTEST_NUM.log > ./grep$UNITTEST_NUM.log
count_lines "<libpmemobj>: <3>.*deep_flush_write.*" pmemobj$UNITTEST_NUM.log >> ./grep$UNITTEST_NUM.log

check

pass
